package com.tcfvic.client.pojos;
// Generated 29/03/2010 9:10:02 PM by Hibernate Tools 3.1.0.beta4

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * Personaddress generated by hbm2java
 */
@Entity
@Table(name="personaddress"
    
, uniqueConstraints = {  }
)

public class Personaddress  implements java.io.Serializable {


    // Fields    

     private PersonaddressId id;
     private Person person;
     private Address address;
     private Date dateofarrival;


    // Constructors

    /** default constructor */
    public Personaddress() {
    }

    
    /** full constructor */
    public Personaddress(PersonaddressId id, Person person, Address address, Date dateofarrival) {
        this.id = id;
        this.person = person;
        this.address = address;
        this.dateofarrival = dateofarrival;
    }
    

   
    // Property accessors
    @EmbeddedId
    @AttributeOverrides( {
        @AttributeOverride(name="personId", column=@Column(name="Person_id", unique=false, nullable=false, insertable=true, updatable=true) ), 
        @AttributeOverride(name="addressId", column=@Column(name="Address_id", unique=false, nullable=false, insertable=true, updatable=true) ) } )

    public PersonaddressId getId() {
        return this.id;
    }
    
    public void setId(PersonaddressId id) {
        this.id = id;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="Person_id", unique=false, nullable=false, insertable=false, updatable=false)

    public Person getPerson() {
        return this.person;
    }
    
    public void setPerson(Person person) {
        this.person = person;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="Address_id", unique=false, nullable=false, insertable=false, updatable=false)

    public Address getAddress() {
        return this.address;
    }
    
    public void setAddress(Address address) {
        this.address = address;
    }
    @Column(name="dateofarrival", unique=false, nullable=false, insertable=true, updatable=true, length=19)

    public Date getDateofarrival() {
        return this.dateofarrival;
    }
    
    public void setDateofarrival(Date dateofarrival) {
        this.dateofarrival = dateofarrival;
    }
   








}
